package com.example.mytest.DAO;

import com.example.mytest.Entity.MessageEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

/**
 * @author MәӧωρaЯsε
 * @date 2017/6/28.
 */
@Repository
public interface MessageDAO extends JpaRepository<MessageEntity,Integer>{

    @Query(value="select * from tbl_msg where obj_id = ? and type = '1' limit 1",nativeQuery = true)
    public MessageEntity getOne(String did);

}
